<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<div th:fragment="column" class="fly-panel fly-column  layui-hide-sm">
  <div class="layui-container">
    <ul class="layui-clear">
      <li class="layui-hide-xs" th:classappend="${nowColumnType == null?'layui-this':''}"><a th:href="@{/}">首页</a></li>
      <!--/*@thymesVar id="columnTypes" type="java.util.List<com.chengliang.bbs.type.ColumnType>"*/-->
      <li th:each="columnType,iterStat : ${columnTypes}" th:classappend="${columnType == nowColumnType?'layui-this':''}" th:if="${iterStat.index != 0}">
        <a th:href="@{'/q/'+${columnType.name()}}"  th:text="${columnType.describe}">提问</a>
      </li>

      <!-- 用户登入后显示 -->
      <th:block sec:authorize="isAuthenticated()">
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a th:href="@{/user/index}" href="user/index.html">我发表的贴</a></li>
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a th:href="@{/user/index#collection}" href="user/index.html#collection">我收藏的贴</a></li>
      </th:block>
    </ul>

    <div class="fly-column-right layui-hide-xs">
      <span class="fly-search"><i class="layui-icon"></i></span>
      <a th:href="@{/jie/add}" class="layui-btn layui-btn-normal">我要提问</a>
    </div>
    <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
      <a th:href="@{/jie/add}" class="layui-btn layui-btn-normal">我要提问</a>
    </div>
  </div>
</div>